import request from '@/utils/request'
import { list } from "@/api/monitor/operlog";

// 查询商机/线索追踪列表
export function listBusinessTrack(query) {
  query.pageNum = 1;
  query.pageSize = 5;
  return list(query)
}

// 新增线索追踪
export function addBusinessTrack(data) {
  return request({
    url: '/crm/business/track',
    method: 'post',
    data: data
  })
}

// 踢回公海
export function giveBackBusiness(id, data) {
  return request({
    url: `/crm/business/track/giveBack/${id}`,
    method: 'put',
    data
  })
}

// 捞取商机
export function resetBusiness(data) {
  return request({
    url: `/crm/business/track/reset/${data.id}`,
    method: 'put',
    data
  })
}

// 转客户
export function transform(data) {
  return request({
    url: `/crm/business/track/transform/${data.id}`,
    method: 'put',
    data
  })
}

